console.log('加载全局函数');
//判断用户的报名状态（PAID,UNPAID,UNREGISTERED）
function checkUserisRegistered(actId,issueNum){
	var res = '';
	$$.ajax({
        url:url_check_user_is_registered,
        method:"GET",
        async:false,
        data:{actId:actId,issueNum:issueNum},
        dataType:'json',
        xhrFields:{withCredentials:true},
        success: function (ajaxresult) { 
        	if(ajaxresult.code==1){
        		res = ajaxresult.data;	            		
        	}else{
              	myApp.alert(ajaxresult.msg);
            }
        }
    });
	return res;
}
//判断组团口令是否存在，并返回团队成员
function checkGrpcodeisExist(actId,issueNum,inviNum){
	var res = '';
	$$.ajax({
        url:url_check_grpcode_is_exist,
        method:"GET",
        async:false,
        data:{actId:actId,issueNum:issueNum,grpcode:inviNum},
        dataType:'json',
        xhrFields:{withCredentials:true},
        success: function (ajaxresult) { 
        	if(ajaxresult.code==1){
        		res = ajaxresult.data;	            		
        	}else{
        		myApp.alert(ajaxresult.msg);
            }
        }
    });
	return res;
}

function userRegister(name,gender,wxnum,IdcardNum,telNum,inviNum,type,actId,actName,issueNum,price){
	var res = '';
	$$.ajax({
        url:url_user_register,
        method:"GET",
        async:false,
        data:{name:name,gender:gender,wxnum:wxnum,
        	IdcardNum:IdcardNum,telNum:telNum,
        	inviNum:inviNum,type:type,actId:actId,actName:actName,issueNum:issueNum,price:price},
        dataType:'json',
        xhrFields:{withCredentials:true},
        success: function (ajaxresult) { 
        	if(ajaxresult.code==1){
        		res = true;
        		//$$('.qrcode').html(ajaxresult.data);
        	}else{
        		myApp.alert(ajaxresult.msg);
            }
        }
    });
	return res;
}